import { AudioMgr } from "../../AudioMgr";
import { Constant } from "../../Constant";
import { Main } from "../../Main";
import StateBase from "../StateBase";

export default class LuckRoleEnterState extends StateBase {
    begin(preState: number): void {
        super.begin(preState);
        //console.log('LuckRoleEnterState state--begin');
        const main = this.getUserData() as Main;
        main.scheduleOnce(() => {

            AudioMgr.inst.playOneShot(main.heroEnter);
        }, 1)
        // 幸运角色进入状态的逻辑
        main.enterRolesRoles[3].playAnimation();
        main.roundTips[3].clear();
        main.scheduleOnce(() => {
            main.mainFsm.goToState(Constant.MainState.LastRecruitPrepare, main);
        }, 2)

    }

    end(nextState: number): void {
        super.end(nextState);
       // console.log('LuckRoleEnterState state--end');
    }
}
